<!--
  @author nowind
  @since 17/07/23 14:34
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>产品配件分类关联</title>

</head>
<body>
<style type="text/css">
    .layui-form-select dl {
        max-height: 130px;
    }

    .layui-anim-upbit dl {
        max-height: 130px;
    }
</style>
<div class="layui-fluid">

    <form method="post" action="" class="layui-form" lay-filter="zmn-purchase-apply-form">
        <div class="layui-card" style="padding-right: 20px; height: 160px">
            <input type="text" name="mapId" id="mapId" class="layui-input layui-hide"/>
            <div class="layui-split">&nbsp;</div>
            <div class="layui-split">&nbsp;</div>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item layui-form-item-sm">
                        <label class="layui-form-label layui-form-label-extend layui-form-required">产品一级分类</label>
                        <div class="layui-input-block layui-input-block-extend" style="max-width: 300px">
                            <select name="baseCategId" id="baseCategId" lay-filter="baseCategId" lay-verify="required" th:value="${categoryMap.baseCategId}" lay-search>
                                <option value="">请选择</option>
                                <option th:each="baseCateSimple:${baseCategorySimpleList}"
                                        th:value="${baseCateSimple.value}"
                                        th:selected="${baseCateSimple.value == categoryMap.baseCategId}"
                                        th:disabled="${!baseCateSimple.status}"
                                        th:text="|${baseCateSimple.text}${baseCateSimple.status?'':'(已禁用)'}|">
                                </option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-form-item layui-form-item-sm">
                        <label class="layui-form-label layui-form-label-extend layui-form-required">配件一级分类</label>
                        <div class="layui-input-block layui-input-block-extend" style="max-width: 300px">
                            <select name="categId" id="categId" lay-filter="categId" lay-verify="required" th:value="${categoryMap.categId}" lay-search>
                                <option value="">请选择</option>
                                <option th:each="partCateSimple:${partCategorySimpleList}"
                                        th:value="${partCateSimple.value}"
                                        th:selected="${partCateSimple.value == categoryMap.categId}"
                                        th:disabled="${!partCateSimple.status}"
                                        th:text="|${partCateSimple.text}${partCateSimple.status?'':'(已禁用)'}|">
                                </option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-split">&nbsp;</div>

        </div>
        <div class="layui-form-item layui-layout-admin">
            <div class="layui-input-block">
                <div class="layui-footer" style="left: 0;">
                    <button type="submit" class="layui-btn" lay-submit
                            lay-filter="zmn-part-category-map-submit">保存
                    </button>
                    <button type="button" class="layui-btn layui-btn-danger"
                            id="iframe-close-button">
                        取消
                    </button>
                </div>
            </div>
        </div>
    </form>


</div>
<script type="text/javascript" th:inline="javascript">
    var json = {
        items: [[${categoryMap}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        plat_part_category_map_edit: "{/}/static/js/module/part/category/map/zmn.plat.category.map.edit"
    }).use(['index', 'plat_part_category_map_edit']);
</script>
</body>
</html>